package com.wanshi.mapper;

import com.wanshi.enitiy.NetImg;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Created by IntelliJ IDEA.
 * @Author jzy
 * @Date 2021/11/24 18:30
 */
public interface NetImgMapper {

    @Insert("insert into netimg(name,size,picurl,uploadtime,description,ip) values(#{name}," +
            "#{size},#{picurl},#{uploadtime},#{description},#{ip})")
    void save(NetImg netImg);

    @Select("select * from netimg order by id desc")
    List<NetImg> findAll();

    @Select("select * from netimg where id= #{id}")
    NetImg findAllById(String id);
}
